import { createRouter, createWebHistory } from 'vue-router'
import Layout from "../views/Layout.vue";
import Login from "../views/Login/login.vue"




const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      component: Layout,
    },
    {
      path:'/login',
      component: Login,
    },
    {
      path:"/admin",
      component: Layout,
      // 配置二级路由映射地址
      children: [
        { path: "adminList", 
        component:()=>import("../views/admin/AdminList.vue")
       },
      //  { path: "addadmin", 
      //  component:()=>import("../views/admin/Addadmin.vue")
      // },
        
      ],
    }
    
  ]
})

export default router
